home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 115 / cd-rom 115.iso / capa / interat / Program / Scripts / KRDemos / KRZOOM.WBS < prev    next >
Encoding:
Text File  |  1996-12-09  |  839 b   |  29 lines

  1. ' ******************************************************************************
  2. ' ZOOMEXT.WBS - ZOOM TO A SIMULATION FILES EXTENTS
  3. '    
  4. '    This script will zoom the current simulation window so that all simulation
  5. '    entities and the origin fit within the screen boundaries.
  6. '
  7. ' Version 2.0, Created by Knowledge Revolution
  8. ' (C) Copyright Knowledge Revolution 1995-1996   All Rights Reserved
  9. '
  10. ' ******************************************************************************
  11.  
  12.  
  13. Sub Main()
  14.     Dim Doc As WMDocument
  15.  
  16.     Set Doc = WM.ActiveDocument
  17.     if (Doc is Nothing) then
  18.         MsgBox "No active document exists.", ebExclamation, "Zoom To Extent"
  19.         Exit Sub
  20.     end if
  21.  
  22.     If Doc.Objects.Count = 0 Then
  23.         MsgBox "No object exists in the document.", ebInformation, "Zoom To Extent"
  24.         Exit Sub
  25.     end if
  26.  
  27.     Doc.ZoomExtents
  28.     
  29. End Sub